﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WorkStation {
    /// <summary>
    /// Interaction logic for PreloaderWindow.xaml
    /// </summary>
    public partial class PreloaderWindow : Window {
        private delegate void NoArgsDelegate();

        public PreloaderWindow() {
            InitializeComponent();
        }

        public void ShowInfo(string message) {
            NoArgsDelegate msg = () => labelInfo.Content = message;
            labelInfo.Dispatcher.BeginInvoke(msg);
        }

        private void CloseAndShutdown(object sender, RoutedEventArgs e) {
            Close();
            Application.Current.Shutdown();
        }
    }
}
